<template>
	<view style="padding-top: 30rpx;">
		<view class="userNameBox flex_b">
			<input type="text" v-model="value" placeholder="请输入昵称"
				placeholder-style="lineHeight: 112rpx;">
			<!-- <view class="">{{value.length}}/6</view> -->
		</view>

		<view class="bomPosition">
			<button type="primary" @click="preserve">保存</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: ''
			};
		},
		onLoad(e) {
			if(e.name) {
				this.value = e.name
			}
		},
		methods: {
			preserve() {
				uni.$emit('nicknameFn', this.value)
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.userNameBox {
		width: 644rpx;
		height: 112rpx;
		background: #ececec;
		border-radius: 6rpx;
		margin: 0 auto;
		line-height: 112rpx;
		padding: 0 25rpx;

		input {
			line-height: 112rpx;
			font-size: 32rpx;
			font-weight: 600;
		}

	}
</style>
